<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <link rel="stylesheet" href="/static/wechat/css/mui.min.css">

    <style type="text/css">
        .mui-bar-nav {
            background-color: #002849;
        }

        .mui-title {
            color: #B2B055;
        }
    </style>
    <script src="/static/lib/layui/layui.js"></script>
<!--    http://jinxiaocun3.wanyucheng.com/static/lib/layer/theme/default/layer.css?v=3.1.1-->
<!--    http://jinxiaocun3.wanyucheng.com/wechat/write_receive/undefinedcss/modules/layer/default/layer.css?v=3.1.1 -->
    <link rel="stylesheet" href="/static/lib/layui/css/layui.css">
</head>
<body>
<script src="/static/wechat/js/mui.min.js"></script>
<script type="text/javascript">
    mui.init()
</script>
<div class="mui-content">
    <header class="mui-bar mui-bar-nav">
        <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" href="{:url('wechat/receive/NoReceive')}"></a>
        <h1 class="mui-title">货运报价系统</h1>
        <a class="mui-icon mui-icon-bars mui-pull-right" href="{:url('wechat/index/index')}"></a>
    </header>
    <div style="margin-top: 52px"></div>
    <div class="mui-card">
        <div class="mui-card-header">订单信息</div>
        <div class="mui-card-content">
            <div class="mui-card-content-inner">
                <ul class="mui-table-view" style="margin-top: 6px;text-align: center;color: #0062CC;">

                    <li class="mui-table-view-cell">
                        <div style="float: left;">
                            <a href="" style="width: 20%;color: blue">订单编号：</a>
                            <a class="">{$order.order_number}</a>
                        </div>
                    </li>

                    <li class="mui-table-view-cell">
                        <div style="float: left;">
                            <a href="" style="width: 20%;color: blue">货物名称：</a>
                            <a class="">{$order.goods}</a>
                        </div>
                    </li>

                    <li class="mui-table-view-cell">

                        <div style="float: left;">
                            <a href="" style="width: 20%;color: blue">规&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;格：</a>
                            <a class="">{$order.goods_attribute}</a>
                        </div>
                    </li>

                    <li class="mui-table-view-cell">

                        <div style="float: left;">
                            <a href="" style="width: 20%;color: blue">重&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;量：</a>
                            <a class="">{$order.goods_weight}</a>
                        </div>

                    </li>

                    <li class="mui-table-view-cell">
                        <div style="float: left;">
                            <a href="" style="width: 20%;color: blue">客户名称：</a>
                            <a class="">{$order.customer_name}</a>
                        </div>
                    </li>

                    <li class="mui-table-view-cell">
                        <div style="float: left;">
                            <a href="" style="width: 20%;color: blue">收获地址：</a>
                            <a class="">{$order.destination}</a>
                        </div>

                    </li>

                    <li class="mui-table-view-cell">

                        <div style="float: left;">
                            <a href="" style="width: 20%;color: blue">发货时间：</a>
                            <a class="">{$order.send_time|auto_time}</a>
                        </div>

                    </li>

                    <li class="mui-table-view-cell">
                        <div style="float: left;">
                            <a href="" style="width: 20%;color: blue">备注信息：</a>
                            <a class="">{$order.remarks}</a>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div class="mui-card-header">承运方信息</div>
        <div class="mui-card-content">
            <div class="mui-card-content-inner">
                <ul class="mui-table-view" style="margin-top: 6px;text-align: center;color: #0062CC;">

                    <li class="mui-table-view-cell">
                        <div style="float: left;">
                            <a href="" style="width: 20%;color: blue">公司名称：</a>
                            <a class="">{$price.company_name}</a>
                        </div>
                    </li>

                    <li class="mui-table-view-cell">
                        <div style="float: left;">
                            <a href="" style="width: 20%;color: blue">单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;价：</a>
                            <a class="">{$price.price}</a>
                        </div>
                    </li>
                    <li class="mui-table-view-cell">

                        <div style="float: left;">
                            <a href="" style="width: 20%;color: blue">税&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;率：</a>
                            <a class="">{$price.tax}</a>
                        </div>
                    </li>
                    <li class="mui-table-view-cell">
                        <div style="float: left;">
                            <a href="" style="width: 20%;color: blue">总&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;价：</a>
                            <a class="">{$price.end_price}</a>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="mui-card">
        <div class="mui-card-header">填写收货信息</div>
        <div class="mui-card-content">
            <div class="mui-card-content-inner">
                <ul class="mui-table-view">
                    <form>
                        <input type="hidden" name="order_num" value="{$order.order_number}">
                        <div class="mui-content-padded" style="margin: 5px;">
                            <h5>费用说明</h5>
                            <div class="mui-input-row">
                                <input type="text" name="receive_text" class="mui-input"
                                       style="height: 34px;border-radius: 6px;border: 0; background-color: rgba(0, 0, 0, .1);;"
                                       data-input-password="3">
                            </div>
                        </div>
                        <div class="mui-content-padded" style="margin: 5px;">
                            <h5>最终总价</h5>
                            <div class="mui-input-row">
                                <input type="text" name="receive_price" class="mui-input"
                                       style="height: 34px;border-radius: 6px;border: 0; background-color: rgba(0, 0, 0, .1);;"
                                       data-input-password="3">
                            </div>
                        </div>
                        <div class="mui-content-padded" style="margin: 5px;">
                            <h5>最终数量</h5>
                            <div class="mui-input-row">
                                <input type="text" name="receive_num" class="mui-input"
                                       style="height: 34px;border-radius: 6px;border: 0; background-color: rgba(0, 0, 0, .1);;"
                                       data-input-password="3">
                            </div>
                        </div>
                        <div class="mui-content-padded" style="margin: 5px;">
                            <h5>杂品数量(选填)</h5>
                            <div class="mui-input-row">
                                <input type="text" name="residue_num" class="mui-input"
                                       style="height: 34px;border-radius: 6px;border: 0; background-color: rgba(0, 0, 0, .1);;"
                                       data-input-password="3">
                            </div>
                        </div>

                        <input type="hidden" id="pic1" name="photo">
                        <div class="mui-content-padded" style="margin: 5px;">
                            <h5>验证图片</h5>
                            <div class="mui-input-row">
                                <button type="button" id="test1" style="float: left;width: 40%" class="mui-btn">
                                    上传图片
                                </button>
                            </div>
                        </div>

                        <!--展示上传的图片-->
                        <div id="images1"></div>
                        <h5>处理日期</h5>
                        <div class="mui-input-row">
                            <input type="text" value="<?php echo date('Y-m-d H:i:s');?>"  disabled="disabled" class="mui-input"
                                   style="height: 34px;border-radius: 6px;border: 0; background-color: rgba(0, 0, 0, .1);;"
                                   data-input-password="3">
                        </div>
                    </form>
                    <div class="mui-button-row">
                        <button type="button" class="mui-btn mui-btn-primary new_price" onclick="return false;">确认
                        </button>&nbsp;&nbsp;
                        <button type="button" class="mui-btn mui-btn-danger" onclick="return false;">取消</button>
                    </div>
                </ul>
            </div>
        </div>
    </div>
</div>
<script src="/static/plugins/AdminLTE-2.4/bower_components/jquery/dist/jquery.min.js"></script>


<script>
    var u = navigator.userAgent, app = navigator.appVersion;
    var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器
    if(isAndroid){
        $(":file").attr('capture','camera');
    }
</script>
<script>
    layui.use(['layer','upload'], function(){
        var upload = layui.upload;

        //执行实例
        var uploadInst = upload.render({
            elem: '#test1' //绑定元素
            ,url: "{:url('index/index/upImg')}" //上传接口
            ,multiple:true
            ,acceptMime:'image/*'
            ,field:'upimg'
            ,done: function(res){
                //上传完毕回调
                layer.msg(res.msg,{time:2000},function () {
                    if(res.code==1){
                        $("#pic1").val($("#pic1").val()+"uploads/"+res.src+",");
                        var imgHTML =`<div class="mui-card">
                                        <div class="mui-card-header mui-card-media" style="height:40vw;background-image:url({$Request.domain}/uploads/${res.src})"></div>
                                      </div>`;
                        $("#images1").append(imgHTML);
                    }
                })
            }
            ,error: function(){
                //请求异常回调
                layer.msg('上传失败！！！');
            }
        });
    });
</script>

<script src="/static/lib/layer/layer.js"></script>
<script>
    $('.new_price').click(function () {
        $.ajax({
            url: "{:url('wechat/receive/Receive')}",
            type: 'POST',
            data: $('form').serialize(),
            dataType: 'json',
            success: function (data) {
                if (data.code == 1) {
                    layer.msg(data.msg, {
                            icon: 6,
                            time: 2000
                        }, function () {
                            location.href = data.url;
                        }
                    );
                } else {
                    layer.open({
                        title: '失败',
                        content: data.msg,
                        icon: 5
                    })
                }
            }
        });
        return false;
    });
</script>

<!--
var imgHTML = `<span class="profile-picture">
					                    <img id="avatar" class="editable img-responsive editable-click editable-empty"
                                        alt="Alex's Avatar" onmousewheel="return bbimg(this)"
                                        style="height: 174px" src="{$Request.domain}/uploads/${res.src}">
                                        <a class="layui-btn layui-btn-xs img_del" onclick="img_del(this)" set="pic1" img="uploads/${res.src}" style="display: block;margin: 3px auto">删除这张图片</a>
	                                    </span>`;
	                                    -->
<script>
    $(".layui-upload-file").css('display','none');
</script>
</body>
</html>
